{extend name="public/base" /}
    {block name="content"}
        <section class="content-header">
<h1>
           编辑栏目
<small>edit term</small>
</h1>
<ol class="breadcrumb">
	<li><a href="{:U('Index/index')}"><i class="fa fa-dashboard"></i> 首页</a></li>
	<li class="active">编辑栏目</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
	<div class="col-xs-12">
		<div class="box">
			<div class="box-header">

				<h3 class="box-title">
				<a href="{:U('Term/index')}" class="btn btn-primary">栏目管理</a>&nbsp;&nbsp;
				<a href="{:U('Term/addTerm')}" class="btn btn-primary">添加栏目</a>&nbsp;&nbsp;
				<!-- <a href="{:U('Term/addPage')}">添加单页</a>&nbsp;&nbsp; -->
				<!-- <a href="{:U('Term/addTerm')}">更新栏目缓存</a>&nbsp;&nbsp; -->
				</h3>
			</div>
			<form action="{:U('Term/postEdit')}" method="post">
				<input type="hidden" name="id" value="{$edit_info.id}">
				<div class="box-body">
					<!--输入框 -->
					<div class="box-body pad" style="padding:10px 20px;">
				       <label>所属栏目：</label>
						<select name="parent_id" id="parent_id" class="form-control">
							<option value="0">作为一级栏目</option>
				{volist name="all_term" id="data"}
							<option value="{$data.id}" {if condition="($data['id'] eq $edit_info['parent_id'])"}selected{/if}>{$data.name}</option>
				  {/volist}
						</select>
					</div>
					
					<div class="box-body pad" style="padding:10px 20px;">
				       <label>所属模型：</label>
						<select name="model_id" id="parent_id" class="form-control">
							<option value="0">选择所属模型</option>
				               {foreach $modelList as $id => $model}
								<option value="{$id}" {if condition="($id eq $edit_info['model_id'])"}selected{/if}>{$model}</option>
								{/foreach}
						</select>
					</div>
					
					<!-- 判断显示不同界面，楼盘显示楼盘信息 -->
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>名称:</label>
						<input class="form-control" name="name" value="{$edit_info['name']}" placeholder="栏目名称">
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>标识:</label>
						<input class="form-control" name="flag" value="{$edit_info['flag']}" placeholder="栏目标识">
					</div>
					<div class="box-body pad" style="padding:10px 20px 0px 20px;">
					    <label>描述:</label>
						<textarea class="form-control" rows="4" name="description" value="" placeholder="添加栏目描述">{$edit_info['description']}</textarea>
					</div>
                   <!-- 判断显示不同界面，楼盘显示楼盘信息 -->
					<div class="box-body pad" style="padding:10px 20px;margin-top:20px;color:#999999;">
			            是否为楼盘：

						<input type="radio" name="display_nav" value="1" {if condition="($edit_info['display_nav'] eq 1)"}checked="checked"{/if}>是&nbsp;&nbsp;
						<input type="radio" name="display_nav" value="0" {if condition="($edit_info['display_nav'] eq 0)"}checked="checked"{/if}>否&nbsp;&nbsp;
					</div>
					{if condition="$edit_info['display_nav'] eq 1"}
					<!-- 新增字段 -->
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>地区:</label>
						<input class="form-control" name="area" value="{$edit_info['area']}" placeholder="地区">
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>均价:</label>
						<input class="form-control" name="junjia" value="{$edit_info['junjia']}" placeholder="均价">
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>户型:</label>
						<input class="form-control" name="huxing" value="{$edit_info['huxing']}" placeholder="户型">
					</div>	
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>产权:</label>
						<input class="form-control" name="chanquan" value="{$edit_info['chanquan']}" placeholder="面积">
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>开盘:</label>
						<input class="form-control" name="kaipan" value="{$edit_info['kaipan']}" placeholder="开盘">
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>房屋类型:</label>
						<input class="form-control" name="fangtype" value="{$edit_info['fangtype']}" placeholder="房屋类型">
					</div>																
					<!-- 新增字段 END-->
					{/if}
					

					<!--输入框 END-->
					<div class="box-header with-border" style="margin:0 18px;padding-left:0;">
						<h3 class="box-title" >SEO设置:</h3>
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>标题:</label>
						<input class="form-control" name="seo_title" value="{$edit_info['seo_title']}" placeholder="META Title（标题）">
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>关键词:</label>
						<input class="form-control" name="seo_keywords" value="{$edit_info['seo_keywords']}" placeholder="META Keywords（关键词）">
					</div>
					<div class="box-body pad" style="padding:10px 20px 0px 20px;">
					    <label>摘要:</label>
						<textarea class="form-control" rows="4" name="seo_description" value="" placeholder="摘要描述">{$edit_info['seo_description']}</textarea>
					</div>
                    {foreach $formList as $name => $form}
					<div class="box-body pad" style="padding:10px 20px;">
                    {$name}:
                    {$form}
					</div>
                    {/foreach}
				</div>
				<!-- END -->
				<div class="box-body pad" style="padding:10px 20px 0px 20px;">
					<div class="box-footer">
						<input type="submit" class="btn btn-block btn-primary" style="width:100px; border:none; margin-bottom:20px;" value="Submit"/>
					</div>
				</div>
				
				<div style="clear:both">
				</div>
			</form>
		</div>
	</div>
</div>
</section>  
        
    {/block}
